let a
function test(n) {
    if (n===1){
        return 1
    }else{
        a = test(n-1)*n
        return a
    }
}
debugger
console.log(test(5));